home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cppdll / colorsel.h < prev    next >
Text File  |  1990-02-14  |  3KB  |  40 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. *                   Color Selector by A.P.Mazur Jun 15,1989                 *
  4. *                   APM Labs                                                *
  5. *                   511 Dix Way                                             *
  6. *                   San Jose, CA 95125                                      *
  7. *                   All rights reserved. Copyright 1989-1990.               *
  8. *                                                                           *
  9. *  This module allows the caller to select a color.                         *
  10. *  SelectColor() function accepts three parameters:                         *
  11. *   hParent      : handle to the window                                     *
  12. *                  When dialog is finished hParent is activated.            *
  13. *   pColor       : pointer to the LONG variable. If the dialog terminates   *
  14. *                  with an OK message pColor variable will be set to the    *
  15. *                  selected color value, otherwise the pColor remains       *
  16. *                  unchanged.                                               *
  17. *   applyMessage : a message to be sent to the parent window in order to    *
  18. *                  notify about font change. If set to 0 no notification    *                                                                           *
  19. *                  takes place, otherwise a message :                       *
  20. *                    Send(hParent,WM_COMMAND,applyMessage,0L);              *
  21. *                  will be executed each time user changes a color.         *
  22. *                  Sending notification disables a Cancel button.           * 
  23. *  SelectColor returns one of following codes:                              *
  24. *                                                                           *
  25. *    -1      : Insufficient memory to create the dialog box.                *
  26. *     1      : A new color was accepted by the user. The pColor variable    *
  27. *              is updated.                                                  *
  28. *     2      : The dialog was  canceled by the user. The pColor variable    *
  29. *              remains unchanged.                                           *
  30. *     3      : The Color Selector was "busy". Since a Color Selector is NOT *
  31. *              reentrant it can't be used simultaneously with two windows.  *
  32. *              A second invocation will display a message box with the      *
  33. *              information on which application is using a Color Selector,  *
  34. *              when dissmised it will return 3.                             *
  35. *                                                                           *
  36. ****************************************************************************/
  37.              /* imports from colorsel.c module */
  38.  
  39. extern int  FAR PASCAL SelectColor(HWND  hParent,LONG FAR *pColor,WORD applyMessage); 
  40.